<p>This rule raises an issue when an arrow function with a parenthesized expression body is immediately invoked.</p>
<h2>Why is this an issue?</h2>
<p>Immediately Invoked Function Expressions (IIFEs) that use arrow functions with parenthesized expression bodies create unnecessarily complex and
hard-to-read code.</p>
<p>When you combine an arrow function’s concise syntax with parentheses around the expression body and immediate invocation, the result is visually
dense and difficult to parse. The multiple layers of parentheses make it challenging to distinguish between the function parameters, the expression
body, and the invocation arguments.</p>
<p>This pattern often indicates that the code would be clearer if broken down into separate steps or refactored into a named function. The immediate
invocation suggests the logic might be better expressed as sequential statements or extracted into a reusable function.</p>
<h3>What is the potential impact?</h3>
<p>This issue primarily affects code maintainability and readability. Complex IIFE patterns can slow down development, make debugging more difficult,
and increase the likelihood of introducing bugs during code modifications. While not a security or performance concern, poor readability can lead to
misunderstandings and errors in code reviews and maintenance.</p>
<h3>How to fix?</h3>
<p>Break down the IIFE into separate, clear statements. This makes the logic more explicit and easier to follow.</p>
<h4>Non-compliant code example</h4>
<pre data-diff-id="1" data-diff-type="noncompliant">
const foo = (bar =&gt; (bar ? bar.baz : baz))(getBar()); // Noncompliant
</pre>
<h4>Compliant code example</h4>
<pre data-diff-id="1" data-diff-type="compliant">
const bar = getBar();
const foo = bar ? bar.baz : baz;
</pre>
<h3>Documentation</h3>
<ul>
  <li> <a href="https://github.com/sindresorhus/eslint-plugin-unicorn#readme">eslint-plugin-unicorn</a> - Rule <a
  href="https://github.com/sindresorhus/eslint-plugin-unicorn/blob/HEAD/docs/rules/no-unreadable-iife.md">no-unreadable-iife</a> </li>
  <li> MDN - Immediately Invoked Function Expression - <a href="https://developer.mozilla.org/en-US/docs/Glossary/IIFE">Comprehensive guide to IIFE
  patterns and their usage</a> </li>
  <li> MDN - Arrow Functions - <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Arrow_functions">Complete
  reference for arrow function syntax and behavior</a> </li>
</ul>
